﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;


namespace EventManager
{
    public partial class MessagePage : PhoneApplicationPage
    {
        public MessagePage()
        {
            InitializeComponent();
            Loaded += new RoutedEventHandler(MessageList_Loaded);
        }

        private void MessageList_Loaded(object sender, RoutedEventArgs e)
        {
            List<Messages> messageList = new List<Messages>();
            String date = "4/22/11";
            String from = "From: ";

            for (int i = 0; i < 5; i++)
            {
                from += "1";
                messageList.Add(new Messages(date, from));
            }
            MessageList.ItemsSource = messageList;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/ReadMessage.xaml", UriKind.Relative));
        }

    }
}